﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PTCapture
{
    /// <summary>
    /// Class to store more info in listboxes and comboboxes
    /// </summary>
    class ListItem
    {
        #region Fields

        /// <summary>
        /// Display member
        /// </summary>
        public string Name;

        /// <summary>
        /// Value member
        /// </summary>
        public string Value;

        #endregion

        #region Initialization

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="name"></param>
        /// <param name="value"></param>
        public ListItem(string name, string value)
        {
            Name = name;
            Value = value;
        }

        #endregion

        #region Overrides

        /// <summary>
        /// How to display
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            // Generates the text shown in the combo box
            return Name;
        }

        #endregion
    }
}
